/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package cc;
import java.util.*;
import java.util.concurrent.*;
import java.awt.*;
/**
 *
 * @author hcc25_000
 */
public class Sample1 {
    public void method1(){
        System.out.println("this is super Sample1");
    }
    public static void main(String[] args){
        Object o=new Sample1();
        ((Sample1)o).method1();
    }
    /*public static void main(String[] args){
        Point a=new Point(1,2);
       // Point b=new Point(1,2);
        //String b="ss";
        //System.out.println(" "+a.equals(b));
        Point p=new Point(1,2);
        ColorPoint cp1=new ColorPoint(1,2,Color.RED);
        ColorPoint cp2=new ColorPoint(1,2,Color.YELLOW);
        //
        System.out.println(" "+cp1.equals(null));
        //System.out.println(" "+p.equals(cp2));
        //System.out.println(" "+cp1.equals(cp2));
    }*/
}

/*class Point{
    private final int x;
    private final int y;
    
    Point(int x,int y){
        this.x=x;
        this.y=y;
    }
    
    public boolean equals(Object o){
        if(!(o instanceof Point))
            return false;
        Point p=(Point)o;
        return p.x==x&&p.y==y;
    }
}

class ColorPoint extends Point{
    private final Color color;
    
    public ColorPoint(int x,int y,Color color){
        super(x,y);
        this.color=color;
    }
    
    public boolean equals(Object o){
        if(!(o instanceof Point))
            return false;
        
        if(!(o instanceof ColorPoint))
            return o.equals(this);
        return super.equals(o)&&((ColorPoint)o).color==color;
    }
}*/